%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Returns the fundamental matrix     %
%  F through multiple (more than 8)   %
%  correspondence points. NORMALIZED  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function F = Ffromxs_norm(x,xp)
    [x_h,xp_h] = euclid2hmg(x,xp);%converts  (x,y)|->(x,y,1) 
    [x_hn,T1] = hmg2norm(x_h);%nomralizes coordinates using normPt = T1*Pt
    [xp_hn,T2] = hmg2norm(xp_h);%x_h and xp_h with average distance to the centroid of 1.4142
    A = get_A(x_hn,xp_hn);%A will have 9 rows and n columns
    Fn = FfromA(A);%normalized F, epipolses
    F = T2'*Fn*T1; %get the denormalized fundamental matrix and epipoles